home *** CD-ROM | disk | FTP | other *** search
-
-
-
- RRRRWWWWWWWWSSSSuuuubbbbSSSSttttrrrriiiinnnngggg((((3333CCCC++++++++)))) RRRRWWWWWWWWSSSSuuuubbbbSSSSttttrrrriiiinnnngggg((((3333CCCC++++++++))))
-
-
-
- NNNNaaaammmmeeee
- RWWSubString - Rogue Wave library class
-
- SSSSyyyynnnnooooppppssssiiiissss
- #include <rw/wstring.h>
-
-
-
- RWWString s(L"test string");
- s(6,3); // "tri"
-
-
-
-
- DDDDeeeessssccccrrrriiiippppttttiiiioooonnnn
- The class RRRRWWWWWWWWSSSSuuuubbbbSSSSttttrrrriiiinnnngggg allows some subsection of an RRRRWWWWWWWWSSSSttttrrrriiiinnnngggg to be
- addressed by defining a ssssttttaaaarrrrttttiiiinnnngggg ppppoooossssiiiittttiiiioooonnnn and an eeeexxxxtttteeeennnntttt. For example the
- 7th through the 11th elements, inclusive, would have a starting position
- of 7 and an extent of 5. The specification of a starting position and
- extent can also be done in your behalf by such functions as
- RRRRWWWWWWWWSSSSttttrrrriiiinnnngggg::::::::ssssttttrrrriiiipppp(((()))) or the overloaded function call operator taking a
- regular expression as an argument. There are no public constructors --
- RRRRWWWWWWWWSSSSuuuubbbbSSSSttttrrrriiiinnnnggggssss are constructed by various functions of the RRRRWWWWWWWWSSSSttttrrrriiiinnnngggg class
- and then destroyed immediately. A zzzzeeeerrrroooo lllleeeennnnggggtttthhhhsubstring is one with a
- defined starting position and an extent of zero. It can be thought of as
- starting just before the indicated character, but not including it. It
- can be used as an lvalue. A null substring is also legal and is
- frequently used to indicate that a requested substring, perhaps through a
- search, does not exist. A null substring can be detected with member
- function iiiissssNNNNuuuullllllll(((()))). However, it cannot be used as an lvalue.
-
- PPPPeeeerrrrssssiiiisssstttteeeennnncccceeee
- None
-
- EEEExxxxaaaammmmpppplllleeee
- #include <rw/rstream.h>
- #include <rw/wstring.h>
- main(){
- RWWString s(L"What I tell you is true.");
- // Create a substring and use it as an lvalue:
- s(15,0) = RWWString(L" three times");
- cout << s << endl;
- return 0;
- }
-
-
- PPPPrrrrooooggggrrrraaaammmm oooouuuuttttppppuuuutttt::::
-
- What I tell you three times is true.
-
-
-
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- RRRRWWWWWWWWSSSSuuuubbbbSSSSttttrrrriiiinnnngggg((((3333CCCC++++++++)))) RRRRWWWWWWWWSSSSuuuubbbbSSSSttttrrrriiiinnnngggg((((3333CCCC++++++++))))
-
-
-
- AAAAssssssssiiiiggggnnnnmmmmeeeennnntttt OOOOppppeeeerrrraaaattttoooorrrrssss
-
-
-
-
- void
- ooooppppeeeerrrraaaattttoooorrrr====(const RWWString&);
-
-
- Assignment from an RRRRWWWWWWWWSSSSttttrrrriiiinnnngggg. The statements:
-
- RWWString a;
-
-
-
- RWWString b;
- b(2, 3) = a;
-
-
- will copy aaaa's data into the substring bbbb((((2222,,,,3333)))). The number of elements
- need not match: if they differ, bbbb will be resized appropriately. If self
- is the null substring, then the statement has no effect.
-
- void
- ooooppppeeeerrrraaaattttoooorrrr====(const wchar_t*);
-
-
- Assignment from a wide character string. Example:
-
- RWWString wstr(L"Mary had a little lamb");
-
-
-
- wchar_t dat[] = L"Perrier";
- wstr(11,4) = dat; // "Mary had a Perrier"
-
-
- Note that the number of characters selected need not match: if they
- differ, wwwwssssttttrrrr will be resized appropriately. If self is the null
- substring, then the statement has no effect.
-
- IIIInnnnddddeeeexxxxiiiinnnngggg OOOOppppeeeerrrraaaattttoooorrrrssss
- wchar_t
- ooooppppeeeerrrraaaattttoooorrrr[[[[]]]](size_t i);
- wchar_t&
- ooooppppeeeerrrraaaattttoooorrrr[[[[]]]](size_t i) const;
-
-
- Returns the iiiith character of the substring. The first variant can be
- used as an lvalue, the second cannot. The index iiii must be between zero
- and the length of the substring less one. Bounds checking is performed:
- if the index is out of range, then an exception of type RRRRWWWWBBBBoooouuuunnnnddddssssEEEErrrrrrrr will
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-
-
-
- RRRRWWWWWWWWSSSSuuuubbbbSSSSttttrrrriiiinnnngggg((((3333CCCC++++++++)))) RRRRWWWWWWWWSSSSuuuubbbbSSSSttttrrrriiiinnnngggg((((3333CCCC++++++++))))
-
-
-
- be thrown.
-
- wchar_t
- ooooppppeeeerrrraaaattttoooorrrr(((())))(size_t i);
- wchar_t&
- ooooppppeeeerrrraaaattttoooorrrr(((())))(size_t i) const;
-
-
- Returns the iiiith character of the substring. The first variant can be
- used as an lvalue, the second cannot. The index iiii must be between zero
- and the length of the substring less one. Bounds checking is enabled by
- defining the pre-processor macro RRRRWWWWBBBBOOOOUUUUNNNNDDDDSSSS____CCCCHHHHEEEECCCCKKKK before including
- <<<<rrrrwwww////wwwwssssttttrrrriiiinnnngggg....hhhh>>>>. In that case, if the index is out of range, then an
- exception of type RRRRWWWWBBBBoooouuuunnnnddddssssEEEErrrrrrrr will be thrown.
-
- PPPPuuuubbbblllliiiicccc MMMMeeeemmmmbbbbeeeerrrr FFFFuuuunnnnccccttttiiiioooonnnnssss
- RWBoolean
- iiiissssNNNNuuuullllllll() const;
-
-
- Returns TTTTRRRRUUUUEEEE if this is a null substring.
-
- size_t
- lllleeeennnnggggtttthhhh() const;
-
-
- Returns the extent (length) of the RRRRWWWWWWWWSSSSuuuubbbbSSSSttttrrrriiiinnnngggg.
-
- RWBoolean
- ooooppppeeeerrrraaaattttoooorrrr!!!!() const;
-
-
- Returns TTTTRRRRUUUUEEEE if this is a null substring.
-
- size_t
- ssssttttaaaarrrrtttt() const;
-
-
- Returns the starting element of the RRRRWWWWWWWWSSSSuuuubbbbSSSSttttrrrriiiinnnngggg.
-
- void
- ttttooooLLLLoooowwwweeeerrrr();
-
-
- Changes all upper-case letters in self to lower-case. Uses the C library
- function ttttoooowwwwlllloooowwwweeeerrrr(((()))).
-
- void
- ttttooooUUUUppppppppeeeerrrr();
-
-
- Changes all lower-case letters in self to upper-case. Uses the C library
-
-
-
- PPPPaaaaggggeeee 3333
-
-
-
-
-
-
- RRRRWWWWWWWWSSSSuuuubbbbSSSSttttrrrriiiinnnngggg((((3333CCCC++++++++)))) RRRRWWWWWWWWSSSSuuuubbbbSSSSttttrrrriiiinnnngggg((((3333CCCC++++++++))))
-
-
-
- function ttttoooowwwwuuuuppppppppeeeerrrr(((()))).
-
- GGGGlllloooobbbbaaaallll LLLLooooggggiiiiccccaaaallll OOOOppppeeeerrrraaaattttoooorrrrssss
- RWBoolean
- ooooppppeeeerrrraaaattttoooorrrr========(const RWWSubString&, const RWWSubString&);
- RWBoolean
- ooooppppeeeerrrraaaattttoooorrrr========(const RWWString&, const RWWSubString&);
- RWBoolean
- ooooppppeeeerrrraaaattttoooorrrr========(const RWWSubString&, const RWWString& );
- RWBoolean
- ooooppppeeeerrrraaaattttoooorrrr========(const wchar_t*, const RWWSubString&);
- RWBoolean
- ooooppppeeeerrrraaaattttoooorrrr========(const RWWSubString&, const wchar_t* );
-
-
- Returns TTTTRRRRUUUUEEEE if the substring is lexicographically equal to the wide
- character string or RRRRWWWWWWWWSSSSttttrrrriiiinnnngggg argument. Case sensitivity is eeeexxxxaaaacccctttt.
-
- RWBoolean
- ooooppppeeeerrrraaaattttoooorrrr!!!!====(const RWWString&, const RWWString& );
- RWBoolean
- ooooppppeeeerrrraaaattttoooorrrr!!!!====(const RWWString&, const RWWSubString&);
- RWBoolean
- ooooppppeeeerrrraaaattttoooorrrr!!!!====(const RWWSubString&, const RWWString& );
- RWBoolean
- ooooppppeeeerrrraaaattttoooorrrr!!!!====(const wchar_t*, const RWWString& );
- RWBoolean
- ooooppppeeeerrrraaaattttoooorrrr!!!!====(const RWWString&, const wchar_t* );
-
-
- Returns the negation of the respective ooooppppeeeerrrraaaattttoooorrrr========(((())))
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 4444
-
-
-
-